package com.daxia.bumall.common;

public enum UserCouponStatus {
    Unused(0, "未使用"),
    Used(1, "已使用"),
    Invalid(2, "已过期");

    private int value;
    private String remark;

    private UserCouponStatus(int value, String remark) {
        this.value = value;
        this.remark = remark;
    }

    public int getValue() {
        return value;
    }

    public String getRemark() {
        return remark;
    }

    public static UserCouponStatus getByValue(int value) {
        for (UserCouponStatus o : UserCouponStatus.values()) {
            if (o.getValue() == value) {
                return o;
            }
        }
        return null;
    }
}